package com.example.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;

@Configuration
@ConditionalOnExpression("'${mqtt.persistence.mysql.enabled:false}' == 'false' && '${mqtt.persistence.redis.enabled:false}' == 'false'")
@org.springframework.boot.autoconfigure.EnableAutoConfiguration(exclude = {
    DataSourceAutoConfiguration.class,
    HibernateJpaAutoConfiguration.class,
    RedisAutoConfiguration.class
})
public class PersistenceConfig {
    // 空配置类，用于在不需要持久化时排除数据库和Redis的自动配置
} 